﻿@using CodeCamp.Models.Shared
@using CodeCamp.Models.Presenters
@model PresentersEditViewModel

<script src="@Url.Content("~/Scripts/jquery-1.5.1.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
@*<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>*@

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Create/Edit Presenter Profile for @Model.EventDisplayName</legend>

        @Html.HiddenFor(model => model.PresenterId)
        @Html.HiddenFor(model => model.ShirtSize)
        @Html.HiddenFor(model => model.HideNotes)

        <div class="editor-label">
            @Html.LabelFor(model => model.FirstName, "First Name")
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.FirstName)
            @Html.ValidationMessageFor(model => model.FirstName)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.LastName, "Last Name")
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.LastName)
            @Html.ValidationMessageFor(model => model.LastName)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.EmailAddress, "Email Address (required, internal use only)")
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.EmailAddress)
            @Html.ValidationMessageFor(model => model.EmailAddress)
        </div>

        @* Check http://forums.asp.net/t/1687150.aspx/1 for information on using style for control *@
        <div class="editor-label">
            @Html.LabelFor(model => model.MobilePhone, "Mobile Phone (optional, internal use only)")
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.MobilePhone)
            @Html.ValidationMessageFor(model => model.MobilePhone)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.TwitterName, "Twitter Name (optional)")
        </div>
        <div class="editor-field">
            @@@Html.EditorFor(model => model.TwitterName)
            @Html.ValidationMessageFor(model => model.TwitterName)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.BlogUrl, "Blog Url (optional)")
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.BlogUrl)
            @Html.ValidationMessageFor(model => model.BlogUrl)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.WebsiteUrl, "Website Url (optional)")
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.WebsiteUrl)
            @Html.ValidationMessageFor(model => model.WebsiteUrl)
        </div>

        @*
        <div class="editor-label">
            @Html.LabelFor(model => model.ShirtSize, "Shirt Size (optional, internal use only)")
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.ShirtSize)
            @Html.ValidationMessageFor(model => model.ShirtSize)
        </div>
        *@

        @*
        <div class="editor-label">
            @Html.LabelFor(model => model.SpeakerRateSpeakerUrl, "Speaker Rate Url (optional)")
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.SpeakerRateSpeakerUrl)
            @Html.ValidationMessageFor(model => model.SpeakerRateSpeakerUrl)
        </div>
        *@

        <div class="editor-label">
            @Html.LabelFor(model => model.Biography)
        </div>
        <div class="editor-field">
            @Html.TextAreaFor(model => model.Biography, new { cols = 80, rows = 10 })
            @Html.ValidationMessageFor(model => model.Biography)
        </div>

        @if (!Model.HideNotes)
        {
        <div class="editor-label">
            @Html.LabelFor(model => model.PrivateNotes, "Private Notes for Presenter and Organizers")
        </div>
        <div class="editor-field">
            @Html.TextAreaFor(model => model.PrivateNotes, new { cols = 80, rows = 10 })
            @Html.ValidationMessageFor(model => model.PrivateNotes)
        </div>

        if (User.IsInRole(CCRoles.RoleNames.BigCheeze) || User.IsInRole(CCRoles.RoleNames.EventContentEditor))
        {
        <div class="editor-label">
            @Html.LabelFor(model => model.OrganizerNotes, "Private Notes for Organizers only")
        </div>
        <div class="editor-field">
            @Html.TextAreaFor(model => model.OrganizerNotes, new { cols = 80, rows = 10 })
            @Html.ValidationMessageFor(model => model.OrganizerNotes)
        </div>
        }
        }

        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
}
